package com.finstone.data.spider;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.finstone.data.spider.eshop.EShopSpiderService;

public class SpiderStarter {

	@SuppressWarnings("resource")
	public static void main(String[] args) {
		ApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:/spring/applicationContext.xml",
				"classpath:/spring/applicationContext-*.xml");

		EShopSpiderService spiderService = applicationContext.getBean(EShopSpiderService.class);

		spiderService.doSpider();

		while (true) {
			try {
				Thread.sleep(5000);
			} catch (InterruptedException e) {

			}
		}
	}
}
